package roborally.model;
/**
 * A super class for all the terminatable objects in roborally.
 * 
 * 
 * @author Mathieu REYMOND
 * @author Joren VERSPEURT
 * @version 2.0
 *
 */

import be.kuleuven.cs.som.annotate.*;
import be.kuleuven.cs.som.taglet.*;

public abstract class Terminatable {

	/**
	 * Create a new terminatable object.
	 * 
	 * @post ...
	 * 		 | isTerminated() == false;
	 */
	protected Terminatable() {
		
		isTerminated = false;
	}
	
	/**
	 * Checks if the object is terminated.
	 * 
	 */
	
	@Basic @Raw
	public boolean isTerminated() {
		
		return isTerminated;
	}
	
	/**
	 * Terminate the object.
	 * 
	 * @post ...
	 * 		 | new.isTerminated() == true;
	 */
	@Basic
	public void terminate() {
		
		isTerminated = true;
	}
	
	/**
	 * The object's state
	 */
	protected boolean isTerminated;
}
